<template>
  <div class="index">
     <yd-navbar title="手机回收">
       <router-link to="userIndex" slot="right">
            <yd-icon name="ucenter-outline" size="25px" color="#777"></yd-icon>
        </router-link>
     </yd-navbar>
     <yd-slider autoplay="3000">
        <yd-slider-item>
            <a href="/">
                <img src="/static/img/banner/1.png">
            </a>
        </yd-slider-item>
        <yd-slider-item>
            <a href="/">
                <img src="/static/img/banner/2.jpg">
            </a>
        </yd-slider-item>
    </yd-slider>
    <yd-grids-group :rows="3">
        <yd-grids-item link="recoverIndex">
            <img slot="icon" src="/static/img/icon/a1.png">
            <span slot="text">手机回收</span>
        </yd-grids-item>
        <yd-grids-item link="repairIndex">
            <img slot="icon" src="/static/img/icon/a2.png">
            <span slot="text">手机维修</span>
        </yd-grids-item>
        <yd-grids-item @click.native="noOpen">
            <img slot="icon" src="/static/img/icon/a3.png">
            <span slot="text">兑换抽奖</span>
        </yd-grids-item>
    </yd-grids-group>
    <div class="index-title">
    热门回收机型
    </div>
    <yd-list theme="3">
        <yd-list-item v-for="item in list" type="link" href="recoverQues">
            <img slot="img" :src="item.img">
            <div slot="title" style="text-align: center;">{{item.title}}</div>
            <div slot="other" style="text-align:center;padding:.1rem">
              <span class="list-price"><em>¥</em>{{item.price}}</span>
            </div>
            <div slot="other">
               <yd-button size="large" type="primary">立即购买</yd-button>
            </div>
        </yd-list-item>
    </yd-list>
  </div>
</template>

<script>
export default {
  name: 'hello',
  data () {
    return {
      list: [
        {img: "/static/img/product.jpg", title: "iphone6", price: 156.23},
        {img: "/static/img/product.jpg", title: "iphone6", price: 156.23},
        {img: "/static/img/product.jpg", title: "iphone6", price: 156.23},
        {img: "/static/img/product.jpg", title: "iphone6", price: 156.23}
      ]
    }
  },
  methods:{
    handleClick: function(){
      
    },
    noOpen: function(){
      this.$dialog.alert({
        title: '手机回收提示您',
        mes: '该功能正在开发中...',
      });
    }
  }

}
</script>
<style scoped>
.index-title{
  padding: .2rem .26rem;
  font-size: .26rem;
}
.index .btn-primary{
  font-size: .26rem;
    height: .6rem;
    margin-top: 0.1rem;
}
</style>
